Optimal. Leaf size=174 \[ \frac {\text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{a^{3/2} f}-\frac {b \cot ^3(e+f x)}{a (a+b) f \sqrt {a+b+b \tan ^2(e+f x)}}+\frac {(3 a-b) (a+3 b) \cot (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^3 f}-\frac {(a-3 b) \cot ^3(e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 174, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {4226, 2000,
483, 597, 12, 385, 209} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)+b}}\right )}{a^{3/2} f}-\frac {(a-3 b) \cot ^3(e+f x) \sqrt {a+b \tan ^2(e+f x)+b}}{3 a f (a+b)^2}-\frac {b \cot ^3(e+f x)}{a f (a+b) \sqrt {a+b \tan ^2(e+f x)+b}}+\frac {(3 a-b) (a+3 b) \cot (e+f x) \sqrt {a+b \tan ^2(e+f x)+b}}{3 a f (a+b)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 209
Rule 385
Rule 483
Rule 597
Rule 2000
Rule 4226
Rubi steps
\begin {align*} \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{3/2}} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right ) \left (a+b \left (1+x^2\right )\right )^{3/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right ) \left (a+b+b x^2\right )^{3/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {b \cot ^3(e+f x)}{a (a+b) f \sqrt {a+b+b \tan ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {a-3 b-4 b x^2}{x^4 \left (1+x^2\right ) \sqrt {a+b+b x^2}} \, dx,x,\tan (e+f x)\right )}{a (a+b) f}\\ &=-\frac {b \cot ^3(e+f x)}{a (a+b) f \sqrt {a+b+b \tan ^2(e+f x)}}-\frac {(a-3 b) \cot ^3(e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^2 f}-\frac {\text {Subst}\left (\int \frac {(3 a-b) (a+3 b)+2 (a-3 b) b x^2}{x^2 \left (1+x^2\right ) \sqrt {a+b+b x^2}} \, dx,x,\tan (e+f x)\right )}{3 a (a+b)^2 f}\\ &=-\frac {b \cot ^3(e+f x)}{a (a+b) f \sqrt {a+b+b \tan ^2(e+f x)}}+\frac {(3 a-b) (a+3 b) \cot (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^3 f}-\frac {(a-3 b) \cot ^3(e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^2 f}+\frac {\text {Subst}\left (\int \frac {3 (a+b)^3}{\left (1+x^2\right ) \sqrt {a+b+b x^2}} \, dx,x,\tan (e+f x)\right )}{3 a (a+b)^3 f}\\ &=-\frac {b \cot ^3(e+f x)}{a (a+b) f \sqrt {a+b+b \tan ^2(e+f x)}}+\frac {(3 a-b) (a+3 b) \cot (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^3 f}-\frac {(a-3 b) \cot ^3(e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^2 f}+\frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b+b x^2}} \, dx,x,\tan (e+f x)\right )}{a f}\\ &=-\frac {b \cot ^3(e+f x)}{a (a+b) f \sqrt {a+b+b \tan ^2(e+f x)}}+\frac {(3 a-b) (a+3 b) \cot (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^3 f}-\frac {(a-3 b) \cot ^3(e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^2 f}+\frac {\text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,\frac {\tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{a f}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+b+b \tan ^2(e+f x)}}\right )}{a^{3/2} f}-\frac {b \cot ^3(e+f x)}{a (a+b) f \sqrt {a+b+b \tan ^2(e+f x)}}+\frac {(3 a-b) (a+3 b) \cot (e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^3 f}-\frac {(a-3 b) \cot ^3(e+f x) \sqrt {a+b+b \tan ^2(e+f x)}}{3 a (a+b)^2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 5.83, size = 224, normalized size = 1.29 \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b-a \sin ^2(e+f x)}}\right ) (a+2 b+a \cos (2 e+2 f x))^{3/2} \sec ^3(e+f x)}{2 \sqrt {2} a^{3/2} f \left (a+b \sec ^2(e+f x)\right )^{3/2}}+\frac {(a+2 b+a \cos (2 e+2 f x))^2 \sec ^3(e+f x) \left (\frac {(4 a+9 b) \csc (e+f x)}{12 (a+b)^3 f}-\frac {\csc ^3(e+f x)}{12 (a+b)^2 f}-\frac {b^3 \sin (e+f x)}{2 a (a+b)^3 f (a+2 b+a \cos (2 e+2 f x))}\right )}{\left (a+b \sec ^2(e+f x)\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.18, size = 7541, normalized size = 43.34
method | result | size |
default | \(\text {Expression too large to display}\) | \(7541\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 489 vs.
\(2 (166) = 332\).
time = 9.49, size = 1102, normalized size = 6.33 \begin {gather*} \left [-\frac {3 \, {\left ({\left (a^{4} + 3 \, a^{3} b + 3 \, a^{2} b^{2} + a b^{3}\right )} \cos \left (f x + e\right )^{4} - a^{3} b - 3 \, a^{2} b^{2} - 3 \, a b^{3} - b^{4} - {\left (a^{4} + 2 \, a^{3} b - 2 \, a b^{3} - b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a} \log \left (128 \, a^{4} \cos \left (f x + e\right )^{8} - 256 \, {\left (a^{4} - a^{3} b\right )} \cos \left (f x + e\right )^{6} + 32 \, {\left (5 \, a^{4} - 14 \, a^{3} b + 5 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{4} + a^{4} - 28 \, a^{3} b + 70 \, a^{2} b^{2} - 28 \, a b^{3} + b^{4} - 32 \, {\left (a^{4} - 7 \, a^{3} b + 7 \, a^{2} b^{2} - a b^{3}\right )} \cos \left (f x + e\right )^{2} + 8 \, {\left (16 \, a^{3} \cos \left (f x + e\right )^{7} - 24 \, {\left (a^{3} - a^{2} b\right )} \cos \left (f x + e\right )^{5} + 2 \, {\left (5 \, a^{3} - 14 \, a^{2} b + 5 \, a b^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (a^{3} - 7 \, a^{2} b + 7 \, a b^{2} - b^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \sin \left (f x + e\right )\right ) \sin \left (f x + e\right ) - 8 \, {\left ({\left (4 \, a^{4} + 9 \, a^{3} b + 3 \, a b^{3}\right )} \cos \left (f x + e\right )^{5} - {\left (3 \, a^{4} + 4 \, a^{3} b - 9 \, a^{2} b^{2} + 6 \, a b^{3}\right )} \cos \left (f x + e\right )^{3} - {\left (3 \, a^{3} b + 8 \, a^{2} b^{2} - 3 \, a b^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{24 \, {\left ({\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} f \cos \left (f x + e\right )^{4} - {\left (a^{6} + 2 \, a^{5} b - 2 \, a^{3} b^{3} - a^{2} b^{4}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{5} b + 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} + a^{2} b^{4}\right )} f\right )} \sin \left (f x + e\right )}, -\frac {3 \, {\left ({\left (a^{4} + 3 \, a^{3} b + 3 \, a^{2} b^{2} + a b^{3}\right )} \cos \left (f x + e\right )^{4} - a^{3} b - 3 \, a^{2} b^{2} - 3 \, a b^{3} - b^{4} - {\left (a^{4} + 2 \, a^{3} b - 2 \, a b^{3} - b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {{\left (8 \, a^{2} \cos \left (f x + e\right )^{5} - 8 \, {\left (a^{2} - a b\right )} \cos \left (f x + e\right )^{3} + {\left (a^{2} - 6 \, a b + b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{4 \, {\left (2 \, a^{3} \cos \left (f x + e\right )^{4} - a^{2} b + a b^{2} - {\left (a^{3} - 3 \, a^{2} b\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) - 4 \, {\left ({\left (4 \, a^{4} + 9 \, a^{3} b + 3 \, a b^{3}\right )} \cos \left (f x + e\right )^{5} - {\left (3 \, a^{4} + 4 \, a^{3} b - 9 \, a^{2} b^{2} + 6 \, a b^{3}\right )} \cos \left (f x + e\right )^{3} - {\left (3 \, a^{3} b + 8 \, a^{2} b^{2} - 3 \, a b^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{12 \, {\left ({\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} f \cos \left (f x + e\right )^{4} - {\left (a^{6} + 2 \, a^{5} b - 2 \, a^{3} b^{3} - a^{2} b^{4}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{5} b + 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} + a^{2} b^{4}\right )} f\right )} \sin \left (f x + e\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{4}{\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {cot}\left (e+f\,x\right )}^4}{{\left (a+\frac {b}{{\cos \left (e+f\,x\right )}^2}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________